<!--
 * @Author: your name
 * @Date: 2022-04-11 20:23:02
 * @LastEditTime: 2022-04-13 11:27:14
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \jk_one-stop_cloud_mobile_v1.0\src\views\reportRecord\recordDetail.vue
-->

<template>
  <div class="recordDetail" >
    <Navbar :appTitle="title" />
    <!--头部-->
    <div class="d-head" id="d-head">
      <div class="content">
        <div class="left">
          <div class="title">赢创石化信息开发合同赢创石化信息开发合同赢</div>
          <div class="row">客户编号:dsdsdsdsdsd</div>
          <div class="row">客户编号简称：wwwwwww</div>
        </div>
        <div class="right">
          <img src="@/assets/img/sptg.png" alt="" class="rightImg" />
        </div>
      </div>
      <!--锚点选项卡-->
      <div class="mdtaps" ref="orderview">
        <span
          class="tap"
          @click="tapChange(index)"
          v-for="(item, index) in tabList"
          :key="index"
          :class="{ active: index == active }"
          >{{ item.name }}</span
        >
      </div>
    </div>

    <!-- taps-->
    <div class="tapsContent">
      <div class="otherTaps index0" id="0">
        <div class="title">
          <span class="icon"></span>
          <span class="content">生产商品1</span>
        </div>
        <div class="content">
          <div class="row">
            <span class="label">客户名称：</span>
            <span class="column">安徽即刻</span>
          </div>
          <div class="row">
            <span class="label">销售合同：</span>
            <span class="column">安徽即刻销售合同</span>
          </div>
          <div class="row">
            <span class="label">销售合同1：</span>
            <span class="column">安徽即刻销售合同1</span>
          </div>
          <div class="row">
            <span class="label">销售合同1：</span>
            <span class="column">安徽即刻销售合同1</span>
          </div>
          <div class="row">
            <span class="label">销售合同1：</span>
            <span class="column">安徽即刻销售合同1</span>
          </div>
          <div class="row">
            <span class="label">销售合同1：</span>
            <span class="column">安徽即刻销售合同1</span>
          </div>
        </div>
      </div>
      <!-- taps-->
      <div class="otherTaps" id="1">
        <div class="title">
          <span class="icon"></span>
          <span class="content">生产商品2</span>
        </div>
        <div class="content">
          <div class="row">
            <span class="label">客户名称：</span>
            <span class="column">安徽即刻</span>
          </div>
          <div class="row">
            <span class="label">销售合同：</span>
            <span class="column">安徽即刻销售合同</span>
          </div>
          <div class="row">
            <span class="label">销售合同1：</span>
            <span class="column">安徽即刻销售合同1</span>
          </div>
          <div class="row">
            <span class="label">销售合同1：</span>
            <span class="column">安徽即刻销售合同1</span>
          </div>
          <div class="row">
            <span class="label">销售合同1：</span>
            <span class="column">安徽即刻销售合同1</span>
          </div>
          <div class="row">
            <span class="label">销售合同1：</span>
            <span class="column">安徽即刻销售合同1</span>
          </div>
        </div>
      </div>
      <!-- taps-->
      <div class="otherTaps" id="2">
        <div class="title">
          <span class="icon"></span>
          <span class="content">生产商品3</span>
        </div>
        <div class="content">
          <div class="row">
            <span class="label">客户名称：</span>
            <span class="column">安徽即刻</span>
          </div>
          <div class="row">
            <span class="label">销售合同：</span>
            <span class="column">安徽即刻销售合同</span>
          </div>
          <div class="row">
            <span class="label">销售合同1：</span>
            <span class="column">安徽即刻销售合同1</span>
          </div>
          <div class="row">
            <span class="label">销售合同1：</span>
            <span class="column">安徽即刻销售合同1</span>
          </div>
          <div class="row">
            <span class="label">销售合同1：</span>
            <span class="column">安徽即刻销售合同1</span>
          </div>
          <div class="row">
            <span class="label">销售合同1：</span>
            <span class="column">安徽即刻销售合同1</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Navbar from "@/components/navBar/navBar_right";

export default {
  name: "recordDetail",
  components: { Navbar },
  data() {
    return {
      title: this.$route.meta.title,
      tabList: [
        { name: "发货记录", value: "1" },
        { name: "开票记录", value: "2" },
        { name: "收款记录", value: "2" },
      ],
      active: 0,
    };
  },
  computed: {},
  mounted() {},
  created() {
    this.applyType = this.$route.query.applyType;
    let queryType = "";
  },
  methods: {
    tapChange(obj) {
      this.active = obj;
      
      // const menuHeight = document.getElementById("d-head").offsetHeight;
      // let div1 = document.getElementById(obj).offsetTop;
      let pp=document.getElementById(obj)
      pp.scrollIntoView({behavior: "smooth", block: "start", inline: "start"})
      
    },
  },
};
</script>
<style lang="scss" scoped>
.recordDetail {
  height: 100vh;
  overflow-y: scroll;
  .d-head {
    position: fixed;
    padding: 0.16rem 0.16rem 0 0.16rem;
    background: #ffffff;
    z-index: 999;
    .content {
      display: flex;
      justify-content: space-between;
      align-items: center;
      .left {
        // width: 2rem;
        .title {
          font-size: 0.16rem;
          font-family: PingFang SC;
          font-weight: 500;
          color: #191f25;
          line-height: 0.22rem;
        }
        .row {
          font-size: 0.14rem;
          font-family: PingFang SC;
          font-weight: 400;
          color: #888888;
          margin-top: 0.16rem;
        }
      }
      .right {
        // border: 1px solid red;
        width: 1.5rem;
        .rightImg {
          display: block;
          width: 0.55rem;
          height: 0.55rem;
          margin-left: 0.45rem;
          // border: 1px solid blue;
        }
      }
    }

    .mdtaps {
      overflow-y: hidden;
      overflow-x: auto;
      white-space: nowrap;
      margin-top: 0.3rem;
      :not(:first-child) {
        margin-left: 0.25rem;
      }
      .tap {
        // width: 0.55rem;
        // height: 0.13rem;
        font-size: 0.14rem;
        font-family: PingFang SC;
        font-weight: 400;
        color: #191f25;
        line-height: 0.22rem;
        // margin-left: 0.25rem;
        display: inline-block;
        padding-bottom: 0.1rem;
      }

      .active {
        color: #1890ff;
        border-bottom: 2px solid #1890ff;
      }
    }
  }

  .tapsContent {
    margin-top: 2rem;
  }
  .otherTaps {
    background: #ffffff;
    padding: 0.16rem;
    margin-top: 0.1rem;
    .title {
      padding-bottom: 0.1rem;
      border-bottom: 1px solid #eeeeee;
      .icon {
        display: inline-block;
        width: 0.03rem;
        height: 0.14rem;
        background: #1890ff;
      }
      .content {
        width: 0.63rem;
        height: 0.16rem;
        font-size: 0.16rem;
        font-family: PingFang SC;
        font-weight: bold;
        color: #191f25;
        line-height: 0.22rem;
        margin-left: 0.1rem;
      }
    }
    .content {
      .row {
        font-size: 0.14rem;
        font-family: PingFang SC;
        font-weight: 400;
        margin-top: 0.16rem;
        .label {
          color: #888888;
        }
        .column {
          color: #191f25;
        }
      }
    }
  }
}
</style>